/**
 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Autogenerated file -- DO NOT EDIT!

#include "intrinsics_codegen_ext.inl.h"

% # declare virtual methods implemented in the core part but needed only in plugins
% codegen_plugin_vfuncs = []
% # declare non-virtual methods implemented in the core part but needed only in plugins
% codegen_plugin_funcs = ['CreateMathCeil', 'CreateMathFloor', 'CreateCountLeadingZeroBits']
% codegen_plugin_funcs += ['CreateStringBuilderBool', 'CreateStringBuilderChar','CreateStringBuilderString']
% codegen_plugin_funcs += ['CreateStringFromStringTlab', 'CreateStringFromCharArrayTlab', 'CreateArrayCopyTo']
% codegen_plugin_funcs += ['CreateStringSubstringTlab', 'CreateStringGetCharsTlab']
% codegen_plugin_funcs += ['CreateStringEquals', 'CreateStringHashCode', 'CreateStringCompareTo']
% # generate corresponding virtual method decl.
% codegen_vfuncs = Compiler::intrinsics.select {|i| (i.respond_to? 'codegen_func') && i.is_codegen_virtual? && (!i.skip_codegen_decl?)}.collect {|i| i.codegen_func}
% if !codegen_plugin_vfuncs.nil?
%   codegen_vfuncs += codegen_plugin_vfuncs
% end
% codegen_vfuncs.uniq.each do |codegen_vfunc|
virtual void <%= codegen_vfunc %>(IntrinsicInst *inst, Reg dst, SRCREGS src);
% end
% # generate corresponding non-virtual method decl.
% codegen_funcs = Compiler::intrinsics.select {|i| (i.respond_to? 'codegen_func') && (!i.is_codegen_virtual?) && (!i.skip_codegen_decl?)}.collect {|i| i.codegen_func}
% if !codegen_plugin_funcs.nil?
%   codegen_funcs += codegen_plugin_funcs
% end
% # check for possible intersection and report an error if any
% intersection = codegen_vfuncs.uniq & codegen_funcs.uniq
% if !intersection.empty?
%   print("\n[Error] The following codegen_func(s) must be either `virtual` or `non-virtual`:\n\n")
%   intersection.each do |x|
%     print("  - " + x + "\n")
%   end
%   $stdout.flush
%   abort("\nPlease check the corresponding intrinsic declarations in the .yaml files.\n\n")
% end
% codegen_funcs.uniq.each do |codegen_func|
void <%= codegen_func %>(IntrinsicInst *inst, Reg dst, SRCREGS src);
% end
